<template>
  <div
    class="RichText"
    :style="{ 'margin-top': top, paddingLeft: spacing, paddingRight: spacing }"
  >
    <div v-html="richTextData.text || richTextData.newText" />
  </div>
</template>

<script>
import mixins from '../mixins'
export default {
  name: 'RichText',
  mixins: [mixins],
  props: {
    option: {
      type: Object,
      // eslint-disable-next-line vue/require-valid-default-prop
      default: {}
    },
    isInitData: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      richTextData: {
        title: '',
        text: '暂无数据'
      }
    }
  },
  mounted() {
    // console.log(this.option.fixedData.dataList.data[0], 'APP端初始化数据')
    if (
      this.option.fixedData &&
			this.option.fixedData.dataList.data.length !== 0
    ) {
      this.richTextData = this.option.fixedData.dataList.data[0]
    }
  }
}
</script>

<style scoped lang="scss">
.RichText {
}
</style>
